<template>
	<view style="padding-bottom: 50upx;" @click.stop.prevent="isxue = false">
		<view class="setup">
			<view class="list" style="margin-top: 0;">
				<view class="items title">
					<view style="color: #999;">头像</view>
					<avatar selWidth="200px" selHeight="500upx" @upload="myUpload" :avatarSrc="url"
						avatarStyle="width: 120upx; height: 120upx;margin-left:120px;">
					</avatar>
				</view>
			</view>

			<view class="list">
				<!-- @click="getnav('/pagesB/personalSon/ModifynickName')" -->
				<view class="items" style="flex-direction: column;align-items: flex-start;">
					<view class="" style="display: flex;justify-content: flex-start;">
						<text style="font-size: 24upx;color: #999;">姓名</text>
						<text style="color: red;">*</text>
					</view>
					<view style="width:80%;color: #333333;font-size: 30upx;">
						<input type="text" v-model="user_name" placeholder="请输入姓名" />
					</view>

				</view>
			</view>
			<view class="list">
				<!-- @click="getnav('/pagesB/personalSon/ModifynickName')" -->
				<view class="items" style="flex-direction: column;align-items: flex-start;">
					<view class="" style="display: flex;justify-content: flex-start;">
						<text style="font-size: 24upx;color: #999;">手机号</text>
						<text style="color: red;">*</text>
					</view>
					<view style="width:80%;color: #333333;font-size: 30upx;" v-if="userinfo.phone">
						<input type="text" v-model="userinfo.phone" maxlength="11" />
					</view>
					<view v-else>
						<text style="color: #ffa468;font-size: 15px;" @click="bangshou">前去绑定手机号</text>
					</view>
				</view>
			</view>

		</view>
		<view class="list">
			<text style="color: #999;">性别</text>
			<picker @change="bindPickerChanged" :range="arrays">
				<view>
					<label class="pr38">{{arrays[indexd]}}</label>
					<image src="../../../static/tuo.png" mode=""
						style="width: 30upx;height: 30upx;padding-right: 0upx;"></image>
				</view>
			</picker>
		</view>
		<view class="list">
			<text style="color: #999;">出生年月</text>

			<gpp-date-picker @onCancel="onCancel" @onConfirm="onConfirm" :startDate="startDate" :endDate="endDate"
				:defaultValue="pickerDate">
				<view>
					{{pickerDate}}
					<image src="../../../static/tuo.png" mode=""
						style="width: 30upx;height: 30upx;padding-right: 0upx;"></image>
				</view>
			</gpp-date-picker>


		</view>
		<view class="list">
			<text style="color: #999;">毕业学校</text>
			<view>
				<input type="text" placeholder="填写毕业院校" @input="soso" v-model="school_name" style="font-size: 26upx;">
				<!-- 				<image src="../../../static/tuo.png" mode=""
							style="width: 30upx;height: 30upx;padding-right: 0upx;"></image> -->
			</view>
		</view>
		<view class="list">
			<text style="color: #999;">所学专业</text>
			<view>
				<input type="text" placeholder="填写所学专业" v-model="school_professional" style="font-size: 27upx;">

			</view>
		</view>
		<view class="list">
			<text style="color: #999;">最高学历</text>
			<picker @change="bindPickerChange" :range="array">
				<view>
					<label class="pr38">{{array[indexw]}}</label>
					<image src="../../../static/tuo.png" mode=""
						style="width: 30upx;height: 30upx;padding-right: 0upx;"></image>
				</view>
			</picker>
		</view>
		<view class="list">
			<text style="color: #999;">期望城市</text>

			<view @click="tocity">
				<text>{{city_id}}</text>
				<image src="../../../static/tuo.png" mode="" style="width: 30upx;height: 30upx;padding-right: 0upx;">
				</image>
			</view>
		</view>

		<scroll-view scroll-y="true" class="xuexiao" v-if="isxue">
			<view v-for="(item, index) in leftList">
				<view class="" @click="nato(item.school_name,index)">
					<u-parse :html="school_name,item.school_name | toRed"
						style="width: 100%;height: 100upx;padding: 30upx;border-bottom: 2upx solid #EEEEEE;"></u-parse>
				</view>
			</view>
		</scroll-view>
		<view class="list" style="position: relative;">
			<text style="color: #999;">期望职位</text>

			<view @click="shows">
				<text>{{zhiwei}}</text>
				<image src="../../../static/tuo.png" mode="" style="width: 30upx;height: 30upx;padding-right: 0upx;">
				</image>
			</view>
			<view class="onelist" v-show="isZhi">
				<h3>职位名称</h3>
				<view class="twolist" v-for="item in zhilist" @click="show(item.id)">
					<text>{{item.name}}</text>
					<image src="../../../static/tuo.png" mode=""
						style="width: 30upx;height: 30upx;padding-right: 0upx;">
					</image>
				</view>
			</view>
			<jobSelect ref="jobSelect" :listData="listData" @confirem="confiremJob"></jobSelect>
		</view>
		<view class="list">
			<text style="color: #999;">期望薪资</text>

			<view @tap="openLevel">
				<text>{{pickerText}}</text>
				<image src="../../../static/tuo.png" mode="" style="width: 30upx;height: 30upx;padding-right: 0upx;">
				</image>
			</view>

			<level-linkage ref="levelLinkage" :pickerValueDefault="pickerValueDefault" :allData="treeData"
				@onConfirm="onConfirms" themeColor='#007AFF'></level-linkage>
		</view>
		<view class="list">
			<text style="color: #999;">参加工作时间</text>
			<view class="" style="display: flex;" @click="sjj">
				<KXDateTime :date='date' :end='enddate' :start='startdate' @rundata='kxdatetime' default='start'
					:placeholder="sjstat"></KXDateTime>
			</view>
		</view>
		<view class="list">
			<view class="" style="display: flex;justify-content: space-between;align-items: center;">
				<text style="color: #999;"> 工作经历</text>
				<image src="../../../static/jia.png" mode="" style="width: 35upx;height: 35upx;" @click="tianxie">
				</image>
			</view>
			<view class="" style="display: flex;flex-direction: column;" v-for="item in jllist">
				<view class="" style="display: flex;align-items: center;justify-content: space-between;">
					<text>{{item.company_name}}</text>
					<text class="" style="display: flex;align-items: center;">
						<text style="color: #999999;padding-right: 60upx;">{{item.start_time}}-{{item.end_time}}</text>
						<image src="../../../static/tuo.png" mode=""
							style="width: 30upx;height: 30upx;padding-right: 0upx;" @click="toban(item)">
						</image>
					</text>
				</view>
				<view class="" style="padding-top: 20upx;display: flex;justify-content: flex-start;color: #999999;">
					<text>{{item.job_name}}</text>
					<text style="padding-left: 30upx;">{{item.section}}</text>
				</view>
				<view class=""
					style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;">
					<text style="color: #666666;">内容</text>
					<text style="color: #666666;padding-top: 20upx;">{{item.job_content}}</text>
				</view>
			</view>
		</view>
		<!-- 		<view class="list">
			<text style="color: #999;"> 工作经历</text>

			<view @tap="openLevel">
				<text>{{pickerText}}</text>
				<image src="../../../static/tuo.png" mode="" style="width: 30upx;height: 30upx;padding-right: 0upx;" >
				</image>
			</view>
		</view> -->

		<view class="list">
			<text>个人优势</text>
			<textarea value="" placeholder="请输入你的个人优势" v-model="evaluation" style="width: 100%;"/>
		</view>
		<view class="list" style="display: flex;flex-direction: row;align-items: center;">
			<text style="flex: 1;">上传简历(只能上传图片)</text>
			<!-- <view style="padding: 30rpx;">
			        <Attachment mode="create" :canUploadFile="true" :uploadFileUrl="uploadFileUrl" :heaer="header" :showProcess="true" :attachmentList.sync="attachmentList" @uploadSuccess="uploadSuccess"></Attachment>
			    </view> -->
			<!-- 			<view class="content">
				<button type="primary" @tap="openFile">打开文件选择器</button>
				<view>文件路径为:</view>
				<view class="path">{{path}}</view>
				<tki-file-manager ref="filemanager" @result="resultPath"></tki-file-manager>
			</view> -->
			<view style="display: flex;align-items: center;flex: 1;">
				<image :src="resume_url" mode="" style="width: 150upx;height: 150upx;" @click="previewImg"
					v-show="pdfurl==''"></image>
				<uni-file-picker ref="files" :auto-upload="false" v-model="imageValue" fileMediatype="image" mode="grid"
					@select="select" @progress="progress" @success="success" @fail="fail" limit="1"
					style="margin-top: 30upx;margin-left: 140upx;" :image-styles="imageStyles" />
			</view>

		</view>
		<view class="person-button">
			<button type="warn" @click="confirmEdit" class="btn">确认修改</button>
		</view>
		<view class="mask" v-show="isZhi" @click="isZhi=false"></view>
	</view>
</template>

<script>
	import KXDateTime from "@/components/kx-datetime/kx-datetime.vue"
	import citylist from './data.js'
	import Attachment from '@/components/jin-attachment/jin-attachment.vue';
	import avatar from "@/components/yq-avatar/yq-avatar.vue";
	import tkiFileManager from "@/components/tki-file-manager/tki-file-manager.vue"
	import {
		pathToBase64,
		base64ToPath
	} from '@/components/mmmm-image-tools/index.js'
	import gppDatePicker from "@/components/gpp-datePicker/gpp-datePicker.vue"
	import jobSelect from '@/components/yunmiao-jobSelect/yunmiao-jobSelect.vue'
	import levelLinkage from "@/components/three-level-linkage/linkage.nvue"
	import upLoader from '@/components/upLoader'
	export default {
		data() {
			return {
				text: '',
				title: '',
				path: '',
				zhenImg: '',
				leftList: [],
				iszhan: false,
				isZhi: false,
				url: "../../../static/tianjia.png",
				imageValue: [],
				turl: '',
				iscity: false,
				jllist: [],
				sex: '',
				isxue: false,
				shopId: '',
				titles: '',
				salary: '',
				dianzan: '',
				max: 50,
				nums: 1,
				xingbie: '',
				user_name: '',
				imglist: [],
				chooseImg: [],
				turl: '',
				goodsid: '',
				typed: 0,
				school_name: '',
				src: '',
				imageStyles: {
					width: 60,
					height: 60,
				},
				dataList: [],
				types: 'video',
				turl: '',
				tvideo: '',
				zhiweiId: null,
				goodsinfo: {},
				describe: '',
				zhiwei: '请选择',
				xinzi: '请选择',
				imgurl: '',
				spurl: '',
				startDate: "1950-01-01",
				endDate: "2023-01-01",
				pickerDate: '1989-01-01',
				array: ['选择学历'],
				arrays: ['选择性别', '男', '女'],
				xuelist: [],
				indexw: 0,
				indexd: 0,
				listData: [],
				pickerValueDefault: [0, 0],
				pickerText: '请选择',
				zhilist: [],
				birth: '',
				userinfo: {},
				position_id: '',
				isShow: false,
				upLoadAction: '',
				edu_id: '',
				city_id: '选择城市',
				evaluation: '',
				padding: '',
				pdfurl: '',
				sjstat: '2000-01-01',
				formData: {},
				headerImg: '',
				useinfo: {},
				company_name: '',
				section: "",
				school_id: '',
				job_name: '',
				start_time: '',
				end_time: '',
				job_content: '',
				resume_url: '',
				school_professional: '',
				useid: '',
				date: '2000-01-01',
				enddate: '2023-05-10',
				startdate: '2000-01-01',
				treeData: [{
						"id": "1",
						"name": "1K",
						"code": "11",
						"children": [{
								"id": "1230040276324601851",
								"name": "1K",
								"code": "10001",
							},
							{
								"id": "1230040276324601852",
								"name": "2K",
								"code": "10001",
							},
							{
								"id": "1230040276324601853",
								"name": "3K",
								"code": "10001",
							},
							{
								"id": "1230040276324601854",
								"name": "4K",
								"code": "10001",
							},
						]
					},
					{
						"id": "2",
						"name": "3K",
						"code": "12",
						"children": [{
								"id": "1230040276324601854",
								"name": "4K",
								"code": "10001",
							},
							{
								"id": "1230040276324601",
								"name": "5K",
								"code": "10001",
							},
							{
								"id": "1230040276324606",
								"name": "6K",
								"code": "10001",
							},
							{
								"id": "1230040276324607",
								"name": "7K",
								"code": "10001",
							},
							{
								"id": "1230040276324608",
								"name": "8K",
								"code": "10001",
							},
						]
					},
					{
						"id": "3",
						"name": "5K",
						"code": "13",
						"children": [{
								"id": "1230040276324606",
								"name": "6K",
								"code": "10001",
							},
							{
								"id": "1230040276324607",
								"name": "7K",
								"code": "10001",
							},
							{
								"id": "1230040276324608",
								"name": "8K",
								"code": "10001",
							},
							{
								"id": "12300402763210",
								"name": "10K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "11K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "12K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "13K",
								"code": "10001"
							},
						]
					},
					{
						"id": "4",
						"name": "7K",
						"code": "13",
						"children": [{
								"id": "1230040276324608",
								"name": "8K",
								"code": "10001",
							},
							{
								"id": "12300402763210",
								"name": "10K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "11K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "12K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "13K",
								"code": "10001"
							},
							{
								"id": "1230040276324608",
								"name": "8K",
								"code": "10001",
							},
							{
								"id": "12300402763210",
								"name": "10K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "11K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "12K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "13K",
								"code": "10001"
							},
							{
								"id": "12300402763215",
								"name": "15K",
								"code": "10001"
							},
							{
								"id": "12300402763216",
								"name": "16K",
								"code": "10001"
							},
							{
								"id": "12300402763217",
								"name": "17K",
								"code": "10001"
							},
							{
								"id": "12300402763218",
								"name": "18K",
								"code": "10001"
							},
						]
					},
					{
						"id": "5",
						"name": "9K",
						"code": "13",
						"children": [{
								"id": "12300402763210",
								"name": "10K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "11K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "12K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "13K",
								"code": "10001"
							},
							{
								"id": "12300402763215",
								"name": "15K",
								"code": "10001"
							},
							{
								"id": "12300402763216",
								"name": "16K",
								"code": "10001"
							},
							{
								"id": "12300402763217",
								"name": "17K",
								"code": "10001"
							},
							{
								"id": "12300402763218",
								"name": "18K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "20K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "21K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "22K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "23K",
								"code": "10001"
							},
						]
					},
					{
						"id": "6",
						"name": "11K",
						"code": "13",
						"children": [{
								"id": "12300402763210",
								"name": "12K",
								"code": "10001"
							},
							{
								"id": "12300402763210",
								"name": "13K",
								"code": "10001"
							},
							{
								"id": "12300402763215",
								"name": "15K",
								"code": "10001"
							},
							{
								"id": "12300402763216",
								"name": "16K",
								"code": "10001"
							},
							{
								"id": "12300402763217",
								"name": "17K",
								"code": "10001"
							},
							{
								"id": "12300402763218",
								"name": "18K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "20K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "21K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "22K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "23K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "25K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "26K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "27K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "28K",
								"code": "10001"
							},
						]
					},
					{
						"id": "7",
						"name": "15K",
						"code": "13",
						"children": [{
								"id": "12300402763216",
								"name": "16K",
								"code": "10001"
							},
							{
								"id": "12300402763217",
								"name": "17K",
								"code": "10001"
							},
							{
								"id": "12300402763218",
								"name": "18K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "20K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "21K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "22K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "23K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "25K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "26K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "27K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "28K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "30K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "31K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "32K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "33K",
								"code": "10001"
							},
						]
					},
					{
						"id": "8",
						"name": "17K",
						"code": "13",
						"children": [{
								"id": "12300402763218",
								"name": "18K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "20K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "21K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "22K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "23K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "25K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "26K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "27K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "28K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "30K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "31K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "32K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "33K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "35K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "36K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "37K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "38K",
								"code": "10001"
							},
						]
					},
					{
						"id": "9",
						"name": "20K",
						"code": "13",
						"children": [,
							{
								"id": "12300402763222",
								"name": "22K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "23K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "25K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "26K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "27K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "28K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "30K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "31K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "32K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "33K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "35K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "36K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "37K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "38K",
								"code": "10001"
							},
							{
								"id": "12300402763220",
								"name": "40K",
								"code": "10001"
							},
							{
								"id": "12300402763221",
								"name": "41K",
								"code": "10001"
							},
							{
								"id": "12300402763222",
								"name": "42K",
								"code": "10001"
							},
							{
								"id": "12300402763223",
								"name": "43K",
								"code": "10001"
							},
						]
					},
				],
				uploadFileUrl: 'http://localhost:8081', //替换成你的后端接收文件地址
				llid: '',
				header: {
					// 如果需要header，请上传
				},
				attachmentList: [{
						url: 'https://avatar-static.segmentfault.com/151/147/1511478734-593e62d4d3076_big64',
						type: 'image',
						fileName: 'xxx.png'
					},
					{
						url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
						type: 'image',
						fileName: 'xxx.png'
					},
					{
						url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
						type: 'image',
						fileName: 'xxx.png'
					},
					{
						url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
						type: 'image',
						fileName: 'xxx.png'
					},
					{
						url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256',
						type: 'image',
						fileName: 'xxx.png'
					},
					{
						type: 'file',
						fileName: '这个组件真棒.doc',
						url: 'https://avatar-static.segmentfault.com/820/689/820689728-59e9b54a71fdc_huge256'
					}
				]
			}
		},
		components: {
			gppDatePicker,
			jobSelect,
			levelLinkage,
			upLoader,
			avatar,
			// Attachment,
			tkiFileManager,
			KXDateTime
		},
		onLoad(option) {
			this.useid = option.useid
			uni.request({
				url: 'https://dsx.cdzer.com/api/MemberInfo/getuserinfo', //仅为示例，并非真实接口地址。
				method: 'POST',
				data: {
					uid: option.useid
				},
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {
					console.log(res, "sdadasdasdas")
					this.jllist = res.data.data.job_experience
				}
			});
			// this.jllist.push(JSON.parse(option.joblist))
			const token = uni.getStorageSync('token')
			const device_token = uni.getStorageSync('devicetoken')
			let aData = new Date();
			let dateValue = aData.getFullYear() + "-" + (aData.getMonth() + 1) + "-" + aData.getDate();
			this.typed = option.type
			if (option.indexw) {
				this.indexw = option.indexw
			}
			if (option.indexd) {
				this.indexd = option.indexd
			}

			if (option.sex) {
				this.sex = option.sex
			}

			if (option.evaluation) {

				this.evaluation = option.evaluation
			}
			if (option.resume_url) {

				this.pdfurl = option.resume_url
			}
			if (option.edu_name) {

				// this.array[this.indexw] = option.edu_name
			}
			if (option.sjdate) {
				console.log(option.sjdate, "option.sjdateoption.sjdate")
				this.date = option.sjdate
			}
			if (option.edu_id) {
				this.edu_id = option.edu_id
			}
			if (option.position_id) {
				this.position_id = option.position_id
			}
			if (option.city_id) {
				this.city_id = option.city_id
			}
			if (option.salary) {
				this.salary = option.salary
			}
			if (option.zhiwei) {
				this.zhiwei = option.zhiwei
			}
			if (option.edu_name) {
				this.edu_name = option.edu_name
			}
			if (option.zhen_Img) {
				this.zhenImg = option.zhen_Img
			}
			if (option.pickerText) {
				this.pickerText = option.pickerText
			}
			if (option.headImg) {
				this.headerImg = option.headImg
			}
			if (option.school_name) {
				this.school_name = option.school_name
			}
		 if (option.school_professional) {
				this.school_professional = option.school_professional
			}
			if (option.item) {
				console.log(option, "什么情况什么情况什么情况什么情况")
				if (JSON.parse(option.item).evaluation) {
					this.evaluation = JSON.parse(option.item).evaluation
				}
				if (JSON.parse(option.item).city_name) {
					this.city_id = JSON.parse(option.item).city_name
				}

				if (JSON.parse(option.item).salary) {
					this.pickerText = JSON.parse(option.item).salary
				}
				if (JSON.parse(option.item).pos_name) {
					this.zhiwei = JSON.parse(option.item).pos_name
				}
				if (JSON.parse(option.item).school_name) {
					this.school_name = JSON.parse(option.item).school_name
				}
				if (JSON.parse(option.item).school_professional) {
					this.school_professional = JSON.parse(option.item).school_professional
				}
				if (JSON.parse(option.item).birth) {
					this.pickerDate = JSON.parse(option.item).birth
				}
				if (JSON.parse(option.item).headimgurl) {
					this.zhenImg = JSON.parse(option.item).headimgurl
					this.url =  JSON.parse(option.item).headimgurl
				}else{
					this.url =  "../../../static/tianjia.png"
				}
				if (JSON.parse(option.item).resume_url) {
					this.resume_url = JSON.parse(option.item).resume_url
				}
				if (JSON.parse(option.item).sex == 1) {
					this.indexd = 1
					this.sex = 1
				} else {
					// 	alert(456)
					// this.arrays[this.indexd] = "女"
					this.indexd = 2
					this.sex = 2
				}
				if (JSON.parse(option.item).edu_name) {
					this.array[this.indexw] = JSON.parse(option.item).edu_name
				}
			}
			this.userinfo = JSON.parse(uni.getStorageSync("userInfo"));

			if (option.user_name) {
				this.user_name = option.user_name
			} else {
				this.user_name = this.userinfo.user_name
			}

			console.log(option.item, "职位职位职位职位职位")


		},
		onShow() {
			if (uni.getStorageSync("userInfo")) {
				this.userinfo = JSON.parse(uni.getStorageSync("userInfo"));
				if (this.userinfo.birth) {
					this.date = this.$formatDateTime(this.userinfo.birth * 1000).split(
						" "
					)[0];
				}
				this.index = Number(this.userinfo.sex) ?
					Number(this.userinfo.sex) - 1 :
					0;
			}
			uni.request({
				url: 'https://dsx.cdzer.com/api/Job/geteducation', //仅为示例，并非真实接口地址。
				method: 'POST',
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {
					console.log(res, "学历列表")
					this.xuelist = res.data.data
					res.data.data.forEach(item => {
						this.array.push(item.cate_name)
					})
				}
			});
			uni.request({
				url: 'https://dsx.cdzer.com/api/Job/getposition', //仅为示例，并非真实接口地址。
				method: 'POST',
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {
					console.log(res, "职位分类列表")
					this.zhilist = res.data.data
				}
			});
			uni.request({
				url: 'https://dsx.cdzer.com/api/MemberInfo/getuserinfo', //仅为示例，并非真实接口地址。
				method: 'POST',
				data: {
					uid: this.useid
				},
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {

					this.jllist = res.data.data.job_experience
					res.data.data.job_experience.forEach(item => {

						var a = item.id
						this.llid += a + ','
					})
					console.log(this.llid, "sdadasdasdas")
				}
			});
		},
		filters: {
			toRed: function(content, keyword) {
				var reslut = keyword.replace('' + content + '', "<text style='color:red;'>" + content + "</text>");
				return reslut;
			},
		},
		methods: {
			kxdatetime(e) {
				this.date = e
			},
			sjj() {
				this.kxdatetime()
			},
			toban(item) {
				var sjan = JSON.stringify(item)
				uni.navigateTo({
					url: `./banj?sex=${this.sex}&sjan=${sjan}&useid=${this.useid}&birth=${this.pickerDate}&edu_id=${this.edu_id}&position_id=${this.position_id}&evaluation=${this.evaluation}&resume_url=${this.pdfurl}&salary=${this.salary}&indexw=${this.indexw}&zhiwei=${this.zhiwei}
					&pickerText=${this.pickerText}&edu_name = ${this.edu_name}&indexd=${this.indexd}&user_name=${this.user_name}&zhen_Img=${this.zhenImg}&headImg=${this.zhenImg}`
				})
			},
			tianxie() {
				uni.navigateTo({
					url: `./workjl?sex=${this.sex}&school_name=${this.school_name}&school_professional=${this.school_professional}&useid=${this.useid}
					&birth=${this.pickerDate}&edu_id=${this.edu_id}&position_id=${this.position_id}&evaluation=${this.evaluation}&resume_url=${this.pdfurl}
					&salary=${this.salary}&indexw=${this.indexw}&zhiwei=${this.zhiwei}
					&pickerText=${this.pickerText}&edu_name = ${this.edu_name}&indexd=${this.indexd}
					&user_name=${this.user_name}&zhen_Img=${this.zhenImg}&headImg=${this.zhenImg}&city_id=${this.city_id}&sjdate=${this.date}`
				})
			},
			nato(name, index) {
				this.school_name = name
				this.school_id = this.leftList[index].id
				this.isxue = false
			},
			soso() {
				if (this.school_name !== '') {
					this.isxue = true
					uni.request({
						url: 'https://dsx.cdzer.com/api/MemberInfo/search_school', //仅为示例，并非真实接口地址。
						method: 'POST',
						data: {
							school_name: this.school_name
						},
						header: {
							'content-type': 'application/x-www-form-urlencoded',
						},
						success: (res) => {
							console.log(res, "毕业学校")
							this.leftList = res.data.data
						}
					});
				} else {
					this.isxue = false
				}

			},
			previewImgs(logourl) {
				let _this = this;
				let imgsArray = [];
				imgsArray[0] = _this.zhenImg
				uni.previewImage({
					current: 0,
					urls: imgsArray
				});
			},
			myUpload(rsp) {
				console.log(rsp, "图片选择呀")
				this.url = rsp.path; //更新头像方式一
				pathToBase64(rsp.path).then(base64 => {
					this.turl = base64
					console.log(this.turl, "this.turlthis.turl")
					uni.request({
						url: 'https://dsx.cdzer.com/merchants/Video/uploadImage', //仅为示例，并非真实接口地址。
						data: {
							cover_image: base64
						},
						header: {
							'content-type': 'application/x-www-form-urlencoded',
						},
						method: 'POST',
						success: (res) => {
							console.log(res, "上传视频封面")
							this.zhenImg = res.data.data.image_url
						}
					});
				}).catch(error => {
					console.log(error)
				})
				//rsp.avatar.imgSrc = rsp.path; //更新头像方式二
			},
			bangshou() {
				uni.navigateTo({
					url: './bangphone'
				})
			},
			previewImg(logourl) {
				let _this = this;
				let imgsArray = [];
				imgsArray[0] = _this.resume_url
				uni.previewImage({
					current: 0,
					urls: imgsArray
				});
			},
			back() {
				uni.switchTab({
					url: '/pages/tabBar/mydetail'
				})
			},
			openFile() {
				this.$refs.filemanager._openFile()
			},
			resultPath(e) {
				this.path = e
			},
			confirmEdit() {

				// const uploadedCoverImg = this.$refs.upLoader.resultSrc
				console.log("性别", this.headerImg)

				if (this.headerImg == '') {
					this.$loading();
					var llid = JSON.stringify(this.llid)
					const data = {
						headimgurl: this.zhenImg,
						user_name: this.user_name,
						sex: this.sex,
						birth: this.pickerDate,
						edu_id: this.edu_id,
						position_id: this.position_id,
						city_name: this.city_id,
						evaluation: this.evaluation,
						resume_url: this.pdfurl,
						salary: this.salary,
						school_id: this.school_id,
						school_name: this.school_name,
						school_professional: this.school_professional,
						job_year: this.date,
						// job_experience: JSON.stringify(this.llid)
					};
					this.$http.editprofile(data).then(res => {
					
						if (res.status == 200) {
							console.log(res, "保存资料")
							this.$hideLoading()
							uni.showToast({
								title: res.mess
							})
							setTimeout(() => {
								uni.switchTab({
									url: '/pages/tabBar/mydetail'
								})
							}, 1200)
						} else {
							uni.showToast({
								title: res.mess,
								icon: 'none'
							})
						}
					})

				} else {
					this.$loading();
					const data = {
						headimgurl: this.headerImg,
						user_name: this.user_name,
						sex: this.sex,
						birth: this.pickerDate,
						edu_id: this.edu_id,
						position_id: this.position_id,
						city_name: this.city_id,
						evaluation: this.evaluation,
						resume_url: this.pdfurl,
						salary: this.salary,
						school_id: this.school_id,
						school_name: this.school_name,
						school_professional: this.school_professional,
						job_year: this.date,
						// job_experience: JSON.stringify(this.llid)
					};
					this.$http.editprofile(data).then(res => {

						if (res.status == 200) {
							console.log(res, "保存资料")
							this.$hideLoading()
							uni.showToast({
								title: res.mess
							})
							setTimeout(() => {
								uni.switchTab({
									url: '/pages/tabBar/mydetail'
								})
							}, 1200)
						} else {
							uni.showToast({
								title: res.mess,
								icon: 'none'
							})
						}
					})
				}

			},
			showDisalePhone() {
				this.$u.toast('手机号暂不可修改')
			},
			tocity() {

				uni.navigateTo({
					url: `./city?sex=${this.sex}&school_name=${this.school_name}&school_professional=${this.school_professional}&birth=${this.pickerDate}&edu_id=${this.edu_id}&position_id=${this.position_id}&evaluation=${this.evaluation}&resume_url=${this.pdfurl}&salary=${this.salary}&indexw=${this.indexw}&zhiwei=${this.zhiwei}
					&pickerText=${this.pickerText}&edu_name = ${this.edu_name}&indexd=${this.indexd}&user_name=${this.user_name}&zhen_Img=${this.zhenImg}&headImg=${this.zhenImg}&useid=${this.useid}`
				})
			},
			towok() {
				uni.navigateTo({
					url: `./city?sex=${this.sex}&useid=${this.useid}&birth=${this.pickerDate}&edu_id=${this.edu_id}&position_id=${this.position_id}&evaluation=${this.evaluation}&resume_url=${this.pdfurl}&salary=${this.salary}&indexw=${this.indexw}&zhiwei=${this.zhiwei}
					&pickerText=${this.pickerText}&edu_name = ${this.edu_name}&indexd=${this.indexd}&user_name=${this.user_name}&zhen_Img=${this.zhenImg}&headImg=${this.zhenImg}`
				})
			},
			select(e) {
				console.log('选择文件：', e.files)
				pathToBase64(e.tempFilePaths[0]).then(base64 => {
					this.turl = base64
					console.log(this.turl, "this.turlthis.turl")
					uni.request({
						url: 'https://dsx.cdzer.com/merchants/Video/uploadImage', //仅为示例，并非真实接口地址。
						data: {
							cover_image: base64
						},
						header: {
							'content-type': 'application/x-www-form-urlencoded',
						},
						method: 'POST',
						success: (res) => {
							console.log(res, "上传视频封面")
							this.pdfurl = res.data.data.image_path
						}
					});
				}).catch(error => {
					console.log(error)
				})
			},
			bindClick(e) {
				console.log("哈哈哈哈”", e)
				this.city_id = e.item.name
				this.iscity = false
			},
			shows() {
				this.isZhi = true

			},
			openLevel() {
				this.$refs.levelLinkage.open();

			},
			onConfirms(e) {
				// e 确认后选中的数据
				this.pickerText = e.name
				this.salary = e.name
				console.log(e.name, "看看")
			},
			show(id) {
				this.zhiweiId = id
				uni.request({
					url: 'https://dsx.cdzer.com/api/Job/getpositionlist', //仅为示例，并非真实接口地址。
					method: 'POST',
					data: {
						cate_id: id
					},
					header: {
						'content-type': 'application/x-www-form-urlencoded',
					},
					success: (res) => {
						console.log(res, "岗位列表")
						if (res.data.status == 200) {
							this.listData = res.data.data
							this.$refs.jobSelect.show()
						}
					}
				});
			},
			// 选择职位
			confiremJob(e) {
				console.log(e)
				this.zhiwei = e.name
				this.isZhi = false
				this.position_id = e.id

			},
			bindPickerChange: function(e) { //改变的事件名
				this.indexw = e.target.value //将数组改变索引赋给定义的index变量
				this.edu_id = this.xuelist[this.indexw - 1].id
				this.edu_name = this.xuelist[this.indexw - 1].cate_name
				console.log(this.edu_id, "选择学历")
			},
			bindPickerChanged: function(e) { //改变的事件名
				this.indexd = e.target.value //将数组改变索引赋给定义的index变量
				this.sex = e.target.value
				console.log(e, "选择学历")
			},
			onCancel(e) {
				console.log(e);
			},
			onConfirm(e) {
				this.pickerDate = e.dateValue;
				console.log(this.pickerDate, "出生年月")
			},
			select(e) {
				console.log('选择文件：', e.tempFilePaths[0])
				var name = e.tempFiles[0].name
				pathToBase64(e.tempFilePaths[0]).then(base64 => {
					console.log(this.turl, "this.turlthis.turl")
					uni.request({
						url: 'https://dsx.cdzer.com/merchants/Video/uploadImage', //仅为示例，并非真实接口地址。
						data: {
							cover_image: base64
						},
						header: {
							'content-type': 'application/x-www-form-urlencoded',
						},
						method: 'POST',
						success: (res) => {
							console.log(res, "上传简历")
							this.pdfurl = res.data.data.image_url
						}
					});
				}).catch(error => {
					console.log(error)
				})
			},
			// 获取上传进度
			progress(e) {
				console.log('上传进度：', e)
			},
			// 上传成功
			success(e) {
				console.log('上传成功')
			},
			// 上传失败
			fail(e) {
				console.log('上传失败：', e)
			},
		}
	}
</script>

<style lang="scss" scoped>
	uni-textarea {
		height: 68px;
	}

	.xuexiao {
		width: 100%;
		height: 755upx;
		background-color: #fff;
		position: fixed;
		bottom: 0;
		z-index: 6666;
	}

	.header {
		position: fixed;
		background-color: #fff;
		height: 110upx;
		width: 100%;
		top: 40upx;
		left: 0;
		display: flex;
		z-index: 100;
		align-items: center;
		padding-left: 30upx;
	}

	.mask {
		width: 100%;
		height: 100%;
		position: fixed;
		background: rgba(0, 0, 0, 0.2);
		top: 0;
		left: 0;
		z-index: 100;
		cursor: pointer;
		transition: all 0.15s;
	}

	.content {
		width: 100%;
		overflow: hidden;
	}

	.path {
		font-size: 14px;
		word-break: break-all;
	}

	.onelist {
		width: 100%;
		// height: 500upx;
		z-index: 102;
		background-color: #FFFFFF;
		position: fixed;
		// z-index: 66;
		top: 0upx;
		display: flex;
		left: 0;
		padding-bottom: 40upx;
		flex-direction: column;

		.twolist {
			display: flex;
			padding: 30upx;
			justify-content: space-between;
			border-bottom: 2upx solid #EEEEEE;
			width: 100%;
		}
	}

	.tou {
		display: flex;
		width: 100%;
		height: 180upx;
		justify-content: space-between;
		padding: 30upx;
		align-items: center;
		border-bottom: 2upx solid #EEEEEE;
	}

	.list {
		display: flex;
		flex-direction: column;
		padding: 20upx;
		justify-content: center;
		border-bottom: 2upx solid #EEEEEE;

		view {
			padding-top: 15upx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			color: #000;
		}
	}
</style>
